<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=8">
<title>ServiceStack Redis Admin UI</title>
    
<link rel="stylesheet" href="css/common.css">
<link rel="stylesheet" href="css/tree.css">
<link rel="stylesheet" href="css/tab.css">
<link rel="stylesheet" href="css/toolbar.css">
<link rel="stylesheet" href="css/tabbar.css">
<link rel="stylesheet" href="css/button.css">
<link rel="stylesheet" href="css/custombutton.css">
<link rel="stylesheet" href="css/flatbutton.css">
<link rel="stylesheet" href="css/linkbutton.css">
<link rel="stylesheet" href="css/autocomplete.css">
    
<link rel="stylesheet" href="css/default.css">

<script src="../closure-library/closure/goog/base.js"></script>

<script type="text/javascript">
    goog.require('goog.debug.DivConsole');
    goog.require('goog.debug.FancyWindow');
    goog.require('goog.debug.Trace');

    goog.require('goog.json');
    goog.require('goog.events');
    goog.require('goog.dom');
    goog.require('goog.dom.ViewportSizeMonitor');
    goog.require('goog.History');
    goog.require('goog.async.ConditionalDelay');

    goog.require('goog.ui.tree.TreeControl');
    goog.require('goog.ui.TabBar');
    goog.require('goog.ui.Component');
    goog.require('goog.ui.SplitPane');
    goog.require('goog.ui.SplitPane.Orientation');

    goog.require('goog.ui.Toolbar');
    goog.require('goog.ui.ToolbarRenderer');
    goog.require('goog.ui.ToolbarButton');
    goog.require('goog.ui.ToolbarMenuButton');
    goog.require('goog.ui.ToolbarSelect');
    goog.require('goog.ui.ToolbarSeparator');
    goog.require('goog.ui.ToolbarToggleButton');

    goog.require('goog.ui.Button');
    goog.require('goog.ui.ButtonRenderer');
    goog.require('goog.ui.CustomButton');
    goog.require('goog.ui.CustomButtonRenderer');
    goog.require('goog.ui.FlatButtonRenderer');
    goog.require('goog.ui.LinkButtonRenderer');
    goog.require('goog.ui.ToggleButton');
    goog.require('goog.ui.decorate');

    goog.require('goog.ui.Zippy');
    goog.require('goog.ui.AutoComplete.Basic');

</script>

<script type="text/javascript" src="js/ServiceStack.js"></script>
<script type="text/javascript" src="js/RedisClient.js"></script>

<script type="text/javascript" src="js/redisadmin/ViewController.js"></script>
<script type="text/javascript" src="js/redisadmin/EditorViewController.js"></script>
<script type="text/javascript" src="js/redisadmin/AdminViewController.js"></script>
<script type="text/javascript" src="js/redisadmin/App.js"></script>

</head>

<body>

<div id="body">
    <div id="log" style="display:none">
        <h3 id="divconsole-header">Event Logger</h3>
        <div id="divconsole"></div>
    </div>

    <div id="header">
        <div id="logo">
            <a href="default.htm"><img src="img/redis-small.png" alt="Redis Admin UI"/></a>

            <h1>Admin UI</h1>
        </div>
        <div id="searchbox">
            <input id="txtQuery" type="text" value="urn:*" /><div id="btnSearch" class="goog-custom-button  goog-inline-block">Search Keys</div>
        </div>
    </div>

    <div id="container" class='goog-splitpane'>
        <div class="goog-splitpane-first-container">
            <div id="mainNav"></div>
        </div>
        <div id="content" class='goog-splitpane-second-container'>
            <div id="tab" class="goog-tab-bar goog-tab-bar-top">
                <div id="Admin-tab"  class="goog-tab goog-tab-selected">Admin</div>
                <div id="Editor-tab" class="goog-tab goog-tab-selected">Editor</div>
                <!--<div id="mainNav-tab" class="goog-tab">Main Tab<img class="close-tab" src="images/close_box.gif" title="close tab" /></div>-->
            </div>
            <!-- Use goog-tab-bar-clear to separate the tabs from the content. -->
            <div class="goog-tab-bar-clear"></div>
            <div id="tab_content">
                <div id="Admin-tab_content">
                    <div id="developers">
                        <h3>For Admin UI Developers</h3>
                        <p>
                            The Redis Admin UI is composed of two parts:
                        </p>
                        <ol>
                            <li>
                                An Ajax client web application
                                <em>(developed with
                                <a href="http://code.google.com/p/closure-library/">Google's Closure Library</a>)
                                </em>
                                which as its simply a static html/js/css app, can be easily modified and decoupled
                                from the server component and hosted on any static HTTP file server.
                            </li>
                            <li>
                                A <a href="http://www.servicestack.net">ServiceStack</a>
                                ASP.NET Web Services server application providing SOAP, XML
                                and JSON end points for all Redis operations. <br />
                                It's cross-platform although as its written in .NET
                                <a href="http://www.mono-project.com/ASP.NET">requires Mono to run on Linux</a>.
                            </li>
                        </ol>
                        <p>
                            This Admin UI is customizable and can be easily modified and made to access any of the
                            available <a href="../Public/Metadata">Redis web service operations</a>.
                        </p>
                        <p>
                            A feature-complete JavaScript <a href="js/RedisClient.js">RedisClient.js</a> library
                            provides the most convenient way to access these services from a web page.                            
                        </p>
                    </div>

                    <h2>Redis Server Info</h2>

                    <div id='toolbarServerOps' class='goog-toolbar'>
                    <div id='btnRefreshServerInfo' class='goog-toolbar-button'><span class='icon-refresh goog-inline-block'></span>Refresh Info</div>
                        <div class='goog-toolbar-separator nav-separator'></div>
                        <hr/>
                    <div id='btnRewriteAof' class='goog-toolbar-button'><span class='icon-edit goog-inline-block'></span>Rewrite AOF</div>
                        <hr/>
                    <div id='btnFlushAll' class='goog-toolbar-button'><span class='icon-delete goog-inline-block'></span>Flush All</div>
                    <div id='btnFlushDb' class='goog-toolbar-button'><span class='icon-delete goog-inline-block'></span>Flush DB</div>
                        <hr/>
                        <div class='goog-toolbar-separator nav-separator'></div>
                    <div id='btnResetDb' class='goog-toolbar-button'><span class='icon-refresh goog-inline-block'></span>Reset DB</div>
                    </div>

                    <div id="server-info"></div>
                    
                </div>
                <div id="Editor-tab_content">
                    <h3>Select a key from the left navigation to edit</h3>
                </div>
            </div>
        </div>
        <div class='goog-splitpane-handle'></div>
    </div>

    <div id="footer">
        <strong>powered by: </strong>
        <a href="http://code.google.com/p/servicestack/">servicestack.net</a> |
        <a href="http://code.google.com/p/closure-library/">closure library</a> 
    </div>
</div>

<script type="text/javascript">
    var app = redisadmin.App.getInstance();
    app.enableLogging();
    app.init("urn:*");
</script>

</body>
</html>
